#ifndef __FPGA_H__
#define __FPGA_H__

/*
快门相关
    快门校正		55 43 49 12 00 10 02 43 00 00 00 00 00 00 00 00 00 00 00 00 00 CF C8	
    背景校正		55 43 49 12 00 01 10 52 00 00 00 00 00 00 00 00 00 00 00 00 00 24 FD	
    关闭快门片		55 43 49 12 00 01 0F 45 00 00 00 00 00 00 00 00 00 00 00 00 00 8D 5A	
    开启快门片		55 43 49 12 00 01 0F 45 00 01 00 00 00 00 00 00 00 00 00 00 00 F8 59	
    自动快门开关
        设置-关	55 43 49 12 00 10 02 41 00 00 00 00 00 00 00 00 00 00 00 00 00 0D 3E
        设置-开	55 43 49 12 00 10 02 41 00 01 00 00 00 00 00 00 00 00 00 00 00 78 3D	
        获取	55 43 49 12 00 10 02 81 00 00 00 00 00 00 00 00 00 01 00 00 00 78 34	
            "获取时返回：
                BE AA 02 00 00 00 AD FA EB AA：表示关
                BE AA 02 00 00 01 8C EA EB AA ：表示开"
    自动快门参数
        设置-温度 10            55 43 49 12 00 10 02 42 00 00 0a 00 00 00 00 00 00 00 00 00 00 93 b1	配置值为：Para1[2]、Para1[1]  0x0a 0x00表示10个温度值，约10/32=0.3125度
        设置-温度 50            55 43 49 12 00 10 02 42 00 00 32 00 00 00 00 00 00 00 00 00 00 5A EC	配置值为：Para1[2]、Para1[1]  0x32 0x00表示50个温度值，约50/32=1.56度
        设置-最小间隔时间 1s	55 43 49 12 00 10 02 42 00 01 01 00 00 00 00 00 00 00 00 00 00 92 68	配置值为：Para1[2]、Para1[1]  0x01 0x00表示1s
        设置-最大间隔时间 120s	55 43 49 12 00 10 02 42 00 02 78 00 00 00 00 00 00 00 00 00 00 58 ac	配置值为：Para1[2]、Para1[1]  0x78 0x00表示120s
        设置-最大间隔时间 360s	55 43 49 12 00 10 02 42 00 02 68 01 00 00 00 00 00 00 00 00 00 20 96	配置值为：Para1[2]、Para1[1]  0x68 0x01表示360s
        获取-温度              55 43 49 12 00 10 02 82 00 00 01 00 00 00 00 00 00 02 00 00 00 4E FA	BE AA 03 00 00 5A 00 70 A8 EB AA ：表示0x005A=90。约90/32=2.81度
        获取-最小间隔时间       55 43 49 12 00 10 02 82 00 01 01 00 00 00 00 00 00 02 00 00 00 3B F9	BE AA 03 00 00 05 00 F1 B6 EB AA ：表示0x0005=5s
        获取-最大间隔时间       55 43 49 12 00 10 02 82 00 02 01 00 00 00 00 00 00 02 00 00 00 A4 FC	BE AA 03 00 00 2C 01 AE 1A EB AA ：表示0x012C=300s
*/
int HAL_FPGA_shutter_cal(void);
int HAL_FPGA_background_cal(void);
int HAL_FPGA_shutter_onoff(int onoff);
int HAL_FPGA_auto_shutter(int onoff);   // 0：手动，1：自动
/*
标定相关指令
    k值
        标定k值-先采集低温	55 43 49 12 00 10 11 41 00 00 00 00 00 00 00 00 00 00 00 00 00 A2 93	标定step1：对准低温黑体，黑体温度在25℃及以下，画面闪动后即完成
        标定k值-再采集高温	55 43 49 12 00 10 11 41 00 01 00 00 00 00 00 00 00 00 00 00 00 D7 90	标定step2：对准高温黑体，黑体温度在60℃及以上，画面闪动后即完成
        标定k值-采集完成计算	55 43 49 12 00 10 11 41 00 02 00 00 00 00 00 00 00 00 00 00 00 48 95	标定step3：进行计算，完成后查看标定效果
        保存k值	55 43 49 12 00 10 11 43 00 00 00 00 00 00 00 00 00 00 00 00 00 60 65	标定step4：若效果OK，即执行保存操作
        取消标定结果	55 43 49 12 00 10 11 42 00 00 00 00 00 00 00 00 00 00 00 00 00 01 1E	若效果不OK，则取消标定， 即恢复到标定前状态
        清空k值	55 43 49 12 00 10 11 44 00 00 00 00 00 00 00 00 00 00 00 00 00 66 15	用于测试完全无K值标定的效果
        恢复出厂k值数据	55 43 49 12 00 10 11 45 00 00 00 00 00 00 00 00 00 00 00 00 00 07 6E	恢复出厂数据后，即保存
    盲元
        自动盲元标定	55 43 49 12 00 10 11 51 00 00 00 00 00 00 00 00 00 00 00 00 00 55 55	
        光标开关设置-使能	55 43 49 12 00 10 11 57 00 01 00 00 00 00 00 00 00 00 00 00 00 47 5D	
        光标开关设置-消隐	55 43 49 12 00 10 11 57 00 00 00 00 00 00 00 00 00 00 00 00 00 32 5E	
        光标开关获取	55 43 49 12 00 10 11 81 00 00 00 00 00 00 00 00 00 01 00 00 00 D7 99
            "BE AA 02 00 00 01 8C EA EB AA ：表示使能
            BE AA 02 00 00 00 AD FA EB AA ：表示消隐"
        光标位置设置-（300，280）-示例	55 43 49 12 00 10 11 58 00 2C 01 18 01 00 00 00 00 00 00 00 00 34 50	"Para1[1]+Para1[0]：x轴坐标  0x012C表示300 Para1[3]+Para1[2]：y轴坐标 0x0118表示280"
        光标位置获取	55 43 49 12 00 10 11 82 00 00 00 00 00 00 00 00 00 04 00 00 00 31 A8	BE AA 05 00 00 2C 01 18 01 42 83 EB AA 
        将光标所在点设置为盲元（手动标定）-（300，280）-示例	55 43 49 12 00 10 11 52 00 2C 01 18 01 00 00 00 00 00 00 00 00 9D 4D	"设置成盲元之后，当即生效，即在屏幕上，盲元点消失但不会自动保存，待所有盲元标定完成后，再调用保存盲元指令即可"
        将光标所在点设置为非盲元（手动标定））-（300，280）-示例	55 43 49 12 00 10 11 52 01 2C 01 18 01 00 00 00 00 00 00 00 00 FE 08	
        取消该次标定数据	55 43 49 12 00 10 11 53 00 00 00 00 00 00 00 00 00 00 00 00 00 97 A3	
        保存盲元数据	55 43 49 12 00 10 11 54 00 00 00 00 00 00 00 00 00 00 00 00 00 91 D3	
        清空盲元数据	55 43 49 12 00 10 11 55 00 00 00 00 00 00 00 00 00 00 00 00 00 F0 A8	
        恢复出厂盲元数据	55 43 49 12 00 10 11 56 00 00 00 00 00 00 00 00 00 00 00 00 00 53 25	
    锅盖
        标定锅盖	55 43 49 12 00 10 11 61 00 00 00 00 00 00 00 00 00 00 00 00 00 6D 0E	step1：对准均匀面，下发该指令，画面会冻结，解冻后即完成
        保存锅盖	55 43 49 12 00 10 11 63 00 00 00 00 00 00 00 00 00 00 00 00 00 AF F8	step2：若效果OK，即执行保存操作
        取消标定结果	55 43 49 12 00 10 11 62 00 00 00 00 00 00 00 00 00 00 00 00 00 CE 83	若效果不OK，则取消标定， 即恢复到标定前状态
        清空锅盖	55 43 49 12 00 10 11 64 00 00 00 00 00 00 00 00 00 00 00 00 00 A9 88	用于测试完全无锅盖标定的效果
        恢复出厂锅盖数据	55 43 49 12 00 10 11 65 00 00 00 00 00 00 00 00 00 00 00 00 00 C8 F3	恢复出厂数据后，即保存
*/
/*
系统功能
    固件更新		55 43 49 12 00 01 01 42 00 00 00 00 00 00 00 00 00 00 00 00 00 A5 DB	更新固件之前，需要下发该指令，使模组进入更新模式
    防灼烧保护开关
        设置-关	55 43 49 12 00 10 03 4B 00 00 00 00 00 00 00 00 00 00 00 00 00 58 8D	
        设置-开	55 43 49 12 00 10 03 4B 00 01 00 00 00 00 00 00 00 00 00 00 00 2D 8E	
        获取	55 43 49 12 00 10 03 8B 00 00 00 00 00 00 00 00 00 01 00 00 00 2D 87
            "BE AA 02 00 00 00 AD FA EB AA ：表示关
            BE AA 02 00 00 01 8C EA EB AA ：表示开"
    模组休眠
        设置-唤醒	55 43 49 12 00 10 10 48 00 00 00 00 00 00 00 00 00 00 00 00 00 54 AD	
        设置-休眠	55 43 49 12 00 10 10 48 00 01 00 00 00 00 00 00 00 00 00 00 00 21 AE	休眠后，视频冻结，仅响应唤醒指令，其余指令均不响应
        获取	55 43 49 12 00 10 10 88 00 00 00 00 00 00 00 00 00 01 00 00 00 21 A7
            "BE AA 02 00 00 00 AD FA EB AA  ：表示工作状态
            BE AA 02 00 00 01 8C EA EB AA ：表示休眠状态"
    开机logo
        设置-关	55 43 49 12 00 10 10 41 00 00 00 00 00 00 00 00 00 00 00 00 00 5E 3D	
        设置-开	55 43 49 12 00 10 10 41 00 01 00 00 00 00 00 00 00 00 00 00 00 2B 3E	
        获取	55 43 49 12 00 10 10 81 00 00 00 00 00 00 00 00 00 01 00 00 00 2B 37	
    DVP/I2C电压切换
        设置-1.8V	55 43 49 12 00 10 10 47 00 00 00 00 00 00 00 00 00 00 00 00 00 39 36	
        设置-3.3V	55 43 49 12 00 10 10 47 00 01 00 00 00 00 00 00 00 00 00 00 00 4C 35	
        获取	55 43 49 12 00 10 10 87 00 00 00 00 00 00 00 00 00 01 00 00 00 4C 3C	
    参数保存-恢复
        参数保存	55 43 49 12 00 10 10 51 00 00 00 00 00 00 00 00 00 00 00 00 00 A9 FB	
        参数恢复	55 43 49 12 00 10 10 52 00 00 00 00 00 00 00 00 00 00 00 00 00 0A 76	
*/
int HAL_FPGA_standby(int onoff);
int HAL_FPGA_para_save(void);
int HAL_FPGA_para_recover(void);
/*
获取设备信息
    获取模组信息
        设备名称	55 43 49 12 00 01 01 81 00 01 00 00 00 00 00 00 00 20 00 00 00 FC 1E	"回执：BE AA 21 00 00 43 61 6D 65 72 61 20 4D 49 4E 49 32 33 38 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 1A EB AA Device name：Camera MINI2384，mini2系列的设备名称为15个有效字节"
        固件版本	55 43 49 12 00 01 01 81 00 02 00 00 00 00 00 00 00 0B 00 00 00 32 32	"回执：BE AA 0C 00 00 30 30 2E 30 30 2E 30 31 2E 31 31 0A FE EB AA FW version：00.00.01.11"
        VID	55 43 49 12 00 01 01 81 00 04 00 00 00 00 00 00 00 02 00 00 00 7B CA	"回执：BE AA 03 00 00 74 34 4E FB EB AA  vid：0x3474"
        PID	55 43 49 12 00 01 01 81 00 05 00 00 00 00 00 00 00 02 00 00 00 0E C9	"回执：BE AA 03 00 00 20 00 E2 4F EB AA pid：0x0020"
        PN	55 43 49 12 00 01 01 81 00 06 00 00 00 00 00 00 00 20 00 00 00 B7 16	"回执：BE AA 21 00 00 4D 49 4E 49 32 33 38 34 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 30 68 EB AA pn：MINI2384xxxxxxxxxxxxxxxxxxxxxxxx"
        SN	55 43 49 12 00 01 01 81 00 07 00 00 00 00 00 00 00 20 00 00 00 C2 15	"回执：BE AA 21 00 00 6D 69 6E 69 32 33 38 34 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 78 55 EA EB AA sn：mini2384xxxxxxxxxxxxxxxxxxxxxxxx"
    获取模组温度		55 43 49 12 00 10 10 91 00 00 00 00 00 00 00 00 00 02 00 00 00 00 6A	"BE AA 03 00 00 AA 0C 3D 7A EB AA ：表示0x0CAA=3242，即32.42度 注意该温度仅用于参考，精度误差会±10摄氏度以上"
    获取感兴趣区域内最高温点坐标
            55 43 49 12 00 10 10 92 00 00 00 00 00 7f 01 1f 01 0e 00 00 00 e8 0c
                "举例：选定范围（0，0）到（383，287）：0x011f=287；0x017f=383
                    1.设置坐标时，注意先左上（x1，y1）再右下（x2，y2）。即x1<x2，y1<y2
                    2.获取时：min value，average value，max value，min x，min y，max x，max y。都是uint16类型"
            55 43 49 12 00 10 10 92 00 32 00 32 00 4d 01 ed 00 0e 00 00 00 34 59
                "举例：选定范围（50，50）到（333，237）：0x0032=50;0x014d=333;0x00ed=237
                    回执：BE AA 0F 00 00 D4 1F AE 6F E0 79 4C 00 D2 00 39 00 33 00 D3 F0 EB AA 
                    0x1FD4是最小值，0x6FAE是平均值，0x79E0是最大值。0x004c，0x00D2是最小值坐标，即（76，210），0x0039和0x0033是最大值坐标，即（51，57）"
    获取已开机时间		55 43 49 12 00 10 10 93 00 00 00 00 00 00 00 00 00 04 00 00 00 5B BB	BE AA 05 00 00 D7 01 00 00 EB 98 EB AA：表示0x000001D7=471s
*/
/*
视频出图相关
    数字视频格式
        设置-USB-逐行-30hz	55 43 49 12 00 10 10 46 00 01 00 1e 00 00 00 00 00 00 00 00 00 4f e3	"Para1[0]：0x01，表示开启数字输出，Para1[1]：0x00，表示usb逐行输出，Para1[2]：0x1E，表示30hz输出，面阵大小与探测器输出一致；注意，mini2 640在usb输出模式下最高帧频为30hz"
        设置-USB-逐行-60hz	55 43 49 12 00 10 10 46 00 01 00 3c 00 00 00 00 00 00 00 00 00 c8 04	Para1[0]：0x01，表示开启数字输出，Para1[1]：0x00，表示usb逐行输出，Para1[2]：0x3C，表示60hz输出，面阵大小与探测器输出一致；注意，mini2 640设置该指令将返回错误
        设置-dvp-逐行-30hz	55 43 49 12 00 10 10 46 00 01 01 1e 00 00 00 00 00 00 00 00 00 06 3b	Para1[0]：0x01，表示开启数字输出，Para1[1]：0x01，表示dvp逐行输出，Para1[2]：0x1E，表示30hz输出，面阵大小与探测器输出一致
        设置-dvp-逐行-60hz	55 43 49 12 00 10 10 46 00 01 01 3c 00 00 00 00 00 00 00 00 00 81 dc	Para1[0]：0x01，表示开启数字输出，Para1[1]：0x01，表示dvp逐行输出，Para1[2]：0x3C，表示60hz输出，面阵大小与探测器输出一致
        设置-bt656-逐行-30hz	55 43 49 12 00 10 10 46 00 01 02 00 00 00 00 00 00 00 00 00 00 9e ee	Para1[0]：0x01，表示开启数字输出，Para1[1]：0x02，表示bt656逐行输出，Para1[2]：0x00，表示30hz输出，面阵大小与探测器输出一致
        设置-bt656-逐行-60hz	55 43 49 12 00 10 10 46 00 01 02 01 00 00 00 00 00 00 00 00 00 db 81	Para1[0]：0x01，表示开启数字输出，Para1[1]：0x02，表示bt656逐行输出，Para1[2]：0x01，表示60hz输出，面阵大小与探测器输出一致
        设置-bt656-隔行-50hz	55 43 49 12 00 10 10 46 00 01 12 00 00 00 00 00 00 00 00 00 00 a3 bb	Para1[0]：0x01，表示开启数字输出，Para1[1]：0x12，表示bt656隔行输出，Para1[2]：0x00，无效，面阵大小固定为720*576，帧频固定为50hz，即标准bt656隔行时序
        设置-mipi-逐行-30hz	55 43 49 12 00 10 10 46 00 01 03 1e 00 00 00 00 00 00 00 00 00 b5 9b	Para1[0]：0x01，表示开启数字输出，Para1[1]：0x03，表示mipi逐行输出，Para1[2]：0x1e，表示30hz输出，面阵大小与探测器输出一致
        设置-mipi-逐行-60hz	55 43 49 12 00 10 10 46 00 01 03 3c 00 00 00 00 00 00 00 00 00 32 7c	Para1[0]：0x01，表示开启数字输出，Para1[1]：0x03，表示mipi逐行输出，Para1[2]：0x3c，表示60hz输出，面阵大小与探测器输出一致
        设置-关闭数字输出	55 43 49 12 00 10 10 46 00 00 00 00 00 00 00 00 00 00 00 00 00 58 4d	Para1[0]：0x00，表示关闭数字输出
        获取	55 43 49 12 00 10 10 86 00 00 00 00 00 00 00 00 00 04 00 00 00 68 fb
            "BE AA 05 00 00 00 00 00 00 f5 56 EB AA： 00表示数字输出关
            BE AA 05 00 00 01 00 1e 00 3d 00 EB AA：01表示数字输出开，00表示usb输出，1e表示输出帧率为30hz
            BE AA 05 00 00 01 00 3C 00 B9 60 EB AA：01表示数字输出开，00表示usb输出，3c表示输出帧率为60hz
            BE AA 05 00 00 01 01 1e 00 0d 37  EB AA：01表示数字输出开，01表示dvp输出，1e表示输出帧率为30hz"
    模拟视频格式
        设置-开启ntsc	55 43 49 12 00 10 10 4a 00 01 00 00 00 00 00 00 00 00 00 00 00 e3 58	从pal切换至ntsc，必须先发送关闭模拟指令，再发送该指令
        设置-开启pal	55 43 49 12 00 10 10 4a 00 01 01 00 00 00 00 00 00 00 00 00 00 aa 80	从ntsc切换至pal，必须先发送关闭模拟指令，再发送该指令
        设置-关闭模拟	55 43 49 12 00 10 10 4a 00 00 00 00 00 00 00 00 00 00 00 00 00 96 5b	
        获取	55 43 49 12 00 10 10 8a 00 00 00 00 00 00 00 00 00 02 00 00 00 3f ca
            "BE AA 03 00 00 00 00 04 49 EB AA： 模拟关闭
            BE AA 03 00 00 01 00 35 7a EB AA： 第一个01表示开启，00表示ntsc
            BE AA 03 00 00 01 01 14 6a EB AA： 第一个01表示开启，01表示pal"
    保存数字-模拟出图格式	设置	55 43 49 12 00 10 10 49 00 00 00 00 00 00 00 00 00 00 00 00 00 35 D6	"发送该指令，将同时保存数字视频输出格式与模拟视频输出格式 该状态保存后无法被会“参数恢复”指令重置，仅可通过下一次保存覆盖"
    探测器帧频
        设置-30hz	55 43 49 12 00 10 10 44 00 1E 00 00 00 00 00 00 00 00 00 00 00 5C 9C	mini2 384/640可设置，探测器输出切为30hz
        设置-60hz	55 43 49 12 00 10 10 44 00 3C 00 00 00 00 00 00 00 00 00 00 00 16 F4	mini2 384/640可设置，探测器输出切为60hz
        设置-25hz	55 43 49 12 00 10 10 44 00 19 00 00 00 00 00 00 00 00 00 00 00 17 94	mini2 256可设置，探测器输出切为25hz
        设置-50hz	55 43 49 12 00 10 10 44 00 32 00 00 00 00 00 00 00 00 00 00 00 80 E4	mini2 256可设置，探测器输出切为50hz
        获取	55 43 49 12 00 10 10 84 00 00 00 00 00 00 00 00 00 01 00 00 00 EF B1
            "BE AA 02 00 00 1E 52 09 EB AA ：0x1E表示30hz
            BE AA 02 00 00 3C 72 0D EB AA：0x3C表示60hz "
    图像数据源
        设置-IR	55 43 49 12 00 10 10 45 00 00 00 00 00 00 00 00 00 00 00 00 00 FB C0	探测器原始数据输出
        设置-KBC	55 43 49 12 00 10 10 45 00 01 00 00 00 00 00 00 00 00 00 00 00 8E C3	经过KB校正后的数据输出
        设置-TNR	55 43 49 12 00 10 10 45 00 02 00 00 00 00 00 00 00 00 00 00 00 11 C6	经过去时域噪声后的数据输出
        设置-SNR	55 43 49 12 00 10 10 45 00 03 00 00 00 00 00 00 00 00 00 00 00 64 C5	经过去空间噪声后的数据输出
        设置-DDE	55 43 49 12 00 10 10 45 00 04 00 00 00 00 00 00 00 00 00 00 00 2F CD	经过图像拉伸和细节增强之后的数据输出
        设置-YUV	55 43 49 12 00 10 10 45 00 05 00 00 00 00 00 00 00 00 00 00 00 5A CE	默认最终输出
        获取	55 43 49 12 00 10 10 85 00 00 00 00 00 00 00 00 00 01 00 00 00 8E CA
            "BE AA 02 00 00 00 AD FA EB AA ：表示IR出图
            BE AA 02 00 00 01 8C EA EB AA ：表示KBC出图
            BE AA 02 00 00 02 EF DA EB AA ：表示TNR出图
            BE AA 02 00 00 03 CE CA EB AA ：表示SNR出图
            BE AA 02 00 00 04 29 BA EB AA ：表示DDE出图
            BE AA 02 00 00 05 08 AA EB AA ：表示YUV出图"
    YUV格式
        设置-uyvy	55 43 49 12 00 10 03 4D 00 00 00 00 00 00 00 00 00 00 00 00 00 3F 86	
        设置-vyuy	55 43 49 12 00 10 03 4D 01 00 00 00 00 00 00 00 00 00 00 00 00 5C C3	
        设置-yuyv	55 43 49 12 00 10 03 4D 02 00 00 00 00 00 00 00 00 00 00 00 00 F9 0C	
        设置-yvyu	55 43 49 12 00 10 03 4D 03 00 00 00 00 00 00 00 00 00 00 00 00 9A 49	
        获取	55 43 49 12 00 10 03 8C 00 00 00 00 00 00 00 00 00 01 00 00 00 2B F7	
    画面冻结
        设置-disable	55 43 49 12 00 10 10 42 00 00 00 00 00 00 00 00 00 00 00 00 00 FD B0	
        设置-enable	55 43 49 12 00 10 10 42 00 01 00 00 00 00 00 00 00 00 00 00 00 88 B3	
        获取	55 43 49 12 00 10 10 82 00 00 00 00 00 00 00 00 00 01 00 00 00 88 BA
            "BE AA 02 00 00 00 AD FA EB AA ：表示非冻结状态
            BE AA 02 00 00 01 8C EA EB AA：表示冻结状态"
    镜像翻转
        设置-不翻转	    55 43 49 12 00 10 10 43 00 00 00 00 00 00 00 00 00 00 00 00 00 9C CB	"注意：该功能与电子变倍功能相冲突，即：电子变倍状态下无法翻转 翻转状态下无法电子变倍"
        设置-左右翻转	55 43 49 12 00 10 10 43 00 01 00 00 00 00 00 00 00 00 00 00 00 E9 C8	
        设置-上下翻转	55 43 49 12 00 10 10 43 00 02 00 00 00 00 00 00 00 00 00 00 00 76 CD	
        设置-左右+上下翻转	55 43 49 12 00 10 10 43 00 03 00 00 00 00 00 00 00 00 00 00 00 03 CE	
        获取	55 43 49 12 00 10 10 83 00 00 00 00 00 00 00 00 00 01 00 00 00 E9 C1
            "BE AA 02 00 00 00 AD FA EB AA ：不翻转
            BE AA 02 00 00 01 8C EA EB AA ：左右翻转
            BE AA 02 00 00 02 EF DA EB AA：上下翻转
            BE AA 02 00 00 03 CE CA EB AA ：左右+上下翻转"
    电子变倍-中心
        设置-1倍	55 43 49 12 00 01 31 42 00 00 0A 00 00 00 00 00 00 00 00 00 00 06 0A	"Para1[1]：变倍倍率，0x0A=10，即为1.0倍放大倍率最高为X8.0"
        设置-2倍	55 43 49 12 00 01 31 42 00 00 14 00 00 00 00 00 00 00 00 00 00 41 0C	
        设置-3倍	55 43 49 12 00 01 31 42 00 00 1E 00 00 00 00 00 00 00 00 00 00 7C 0E	
        设置-4倍	55 43 49 12 00 01 31 42 00 00 28 00 00 00 00 00 00 00 00 00 00 CF 00	
        设置-8倍	55 43 49 12 00 01 31 42 00 00 50 00 00 00 00 00 00 00 00 00 00 D3 19	
        获取	55 43 49 12 00 01 31 82 00 00 00 00 00 00 00 00 00 01 00 00 00 4E 02
            "BE AA 02 00 00 50 58 A0 EB AA ：表示0x50=80，即为8.0倍
            注意该指令只用于获取中心变倍的信息，与坐标变倍无关"
    电子变倍-坐标
        设置-(300,100)，2.1倍	55 43 49 12 00 01 31 51 00 00 15 00 00 2C 01 64 00 00 00 00 00 5B 14
            "以指定点作为中心进行变倍
            Para2[1]+Para2[0]：x轴坐标
            Para2[3]+Para2[2]：y轴坐标
            Para1[1]：变倍倍率"
        获取	55 43 49 12 00 01 31 91 00 00 00 00 00 00 00 00 00 05 00 00 00 EB 83
            "BE AA 06 00 00 2C 01 64 00 15 52 F7 EB AA：
            表示 变倍中心坐标为（0x012C，0x0064），即（300，100），倍率为0x15=21，即为2.1倍
            注意该指令只用于获取坐标变倍的信息，与中心变倍无关"
*/
int HAL_FPGA_mirror(int onoff);
int HAL_FPGA_flip(int onoff);
/*
图像调节相关指令
    场景模式
        设置-低温突出           55 43 49 12 00 10 04 42 00 00 00 00 00 00 00 00 00 00 00 00 00 C5 65	
        设置-线性拉伸           55 43 49 12 00 10 04 42 00 01 00 00 00 00 00 00 00 00 00 00 00 B0 66	
        设置-低对比度           55 43 49 12 00 10 04 42 00 02 00 00 00 00 00 00 00 00 00 00 00 2F 63	
        设置-通用模式（默认）    55 43 49 12 00 10 04 42 00 03 00 00 00 00 00 00 00 00 00 00 00 5A 60	
        设置-高对比度           55 43 49 12 00 10 04 42 00 04 00 00 00 00 00 00 00 00 00 00 00 11 68	
        设置-高亮突出           55 43 49 12 00 10 04 42 00 05 00 00 00 00 00 00 00 00 00 00 00 64 6B	
        设置-预留1              55 43 49 12 00 10 04 42 00 06 00 00 00 00 00 00 00 00 00 00 00 FB 6E	
        设置-预留2              55 43 49 12 00 10 04 42 00 07 00 00 00 00 00 00 00 00 00 00 00 8E 6D	
        设置-预留3              55 43 49 12 00 10 04 42 00 08 00 00 00 00 00 00 00 00 00 00 00 6D 7E	
        设置-预留4              55 43 49 12 00 10 04 42 00 09 00 00 00 00 00 00 00 00 00 00 00 18 7D	
        获取                    55 43 49 12 00 10 04 89 00 01 00 00 00 00 00 00 00 01 00 00 00 0D 0A	
    伪彩
        设置-白热	        55 43 49 12 00 10 03 45 00 00 00 00 00 00 00 00 00 00 00 00 00 54 6D	
        设置-reserved	    55 43 49 12 00 10 03 45 00 00 01 00 00 00 00 00 00 00 00 00 00 1D B5	
        设置-辉金 Sepia	    55 43 49 12 00 10 03 45 00 00 02 00 00 00 00 00 00 00 00 00 00 E7 CD	
        设置-铁红 Ironbow	55 43 49 12 00 10 03 45 00 00 03 00 00 00 00 00 00 00 00 00 00 AE 15	
        设置-彩虹 Rainbow	55 43 49 12 00 10 03 45 00 00 04 00 00 00 00 00 00 00 00 00 00 13 3C	
        设置-微光 Night	    55 43 49 12 00 10 03 45 00 00 05 00 00 00 00 00 00 00 00 00 00 5A E4	
        设置-极光 Aurora	55 43 49 12 00 10 03 45 00 00 06 00 00 00 00 00 00 00 00 00 00 A0 9C	
        设置-红热 Red_Hot	55 43 49 12 00 10 03 45 00 00 07 00 00 00 00 00 00 00 00 00 00 E9 44	
        设置-丛林 Jungle	55 43 49 12 00 10 03 45 00 00 08 00 00 00 00 00 00 00 00 00 00 DA CF	
        设置-医疗 Medical	55 43 49 12 00 10 03 45 00 00 09 00 00 00 00 00 00 00 00 00 00 93 17	
        设置-黑热 Black_Hot	55 43 49 12 00 10 03 45 00 00 0A 00 00 00 00 00 00 00 00 00 00 69 6F	
        设置-金红 Glory_Hot	55 43 49 12 00 10 03 45 00 00 0B 00 00 00 00 00 00 00 00 00 00 20 B7	
        获取	            55 43 49 12 00 10 03 85 00 00 00 00 00 00 00 00 00 01 00 00 00 21 67	
    细节增强
        设置-0档	55 43 49 12 00 10 04 45 00 00 00 00 00 00 00 00 00 00 00 00 00 C3 15	
        设置-10档	55 43 49 12 00 10 04 45 00 0A 00 00 00 00 00 00 00 00 00 00 00 81 08	
        设置-20档	55 43 49 12 00 10 04 45 00 14 00 00 00 00 00 00 00 00 00 00 00 47 2F	
        设置-30档	55 43 49 12 00 10 04 45 00 1E 00 00 00 00 00 00 00 00 00 00 00 05 32	
        设置-40档	55 43 49 12 00 10 04 45 00 28 00 00 00 00 00 00 00 00 00 00 00 CB 60	
        设置-50档	55 43 49 12 00 10 04 45 00 32 00 00 00 00 00 00 00 00 00 00 00 D9 4A	
        设置-60档	55 43 49 12 00 10 04 45 00 3C 00 00 00 00 00 00 00 00 00 00 00 4F 5A	
        设置-70档	55 43 49 12 00 10 04 45 00 46 00 00 00 00 00 00 00 00 00 00 00 BD C3	
        设置-80档	55 43 49 12 00 10 04 45 00 50 00 00 00 00 00 00 00 00 00 00 00 D3 FF	
        设置-90档	55 43 49 12 00 10 04 45 00 5A 00 00 00 00 00 00 00 00 00 00 00 91 E2	
        设置-100档	55 43 49 12 00 10 04 45 00 64 00 00 00 00 00 00 00 00 00 00 00 F7 AB	
        获取	    55 43 49 12 00 10 04 85 00 01 00 00 00 00 00 00 00 01 00 00 00 C3 1C	
    亮度
        设置-0档	55 43 49 12 00 10 04 47 00 00 00 00 00 00 00 00 00 00 00 00 00 01 E3	
        设置-10档	55 43 49 12 00 10 04 47 00 0A 00 00 00 00 00 00 00 00 00 00 00 43 FE	
        设置-20档	55 43 49 12 00 10 04 47 00 14 00 00 00 00 00 00 00 00 00 00 00 85 D9	
        设置-30档	55 43 49 12 00 10 04 47 00 1E 00 00 00 00 00 00 00 00 00 00 00 C7 C4	
        设置-40档	55 43 49 12 00 10 04 47 00 28 00 00 00 00 00 00 00 00 00 00 00 09 96	
        设置-50档	55 43 49 12 00 10 04 47 00 32 00 00 00 00 00 00 00 00 00 00 00 1B BC	
        设置-60档	55 43 49 12 00 10 04 47 00 3C 00 00 00 00 00 00 00 00 00 00 00 8D AC	
        设置-70档	55 43 49 12 00 10 04 47 00 46 00 00 00 00 00 00 00 00 00 00 00 7F 35	
        设置-80档	55 43 49 12 00 10 04 47 00 50 00 00 00 00 00 00 00 00 00 00 00 11 09	
        设置-90档	55 43 49 12 00 10 04 47 00 5A 00 00 00 00 00 00 00 00 00 00 00 53 14	
        设置-100档	55 43 49 12 00 10 04 47 00 64 00 00 00 00 00 00 00 00 00 00 00 35 5D	
        获取	    55 43 49 12 00 10 04 87 00 01 00 00 00 00 00 00 00 01 00 00 00 01 EA	
    对比度
        设置-0档	55 43 49 12 00 10 04 4A 00 00 00 00 00 00 00 00 00 00 00 00 00 AE 8E	
        设置-10档	55 43 49 12 00 10 04 4A 00 0A 00 00 00 00 00 00 00 00 00 00 00 EC 93	
        设置-20档	55 43 49 12 00 10 04 4A 00 14 00 00 00 00 00 00 00 00 00 00 00 2A B4	
        设置-30档	55 43 49 12 00 10 04 4A 00 1E 00 00 00 00 00 00 00 00 00 00 00 68 A9	
        设置-40档	55 43 49 12 00 10 04 4A 00 28 00 00 00 00 00 00 00 00 00 00 00 A6 FB	
        设置-50档	55 43 49 12 00 10 04 4A 00 32 00 00 00 00 00 00 00 00 00 00 00 B4 D1	
        设置-60档	55 43 49 12 00 10 04 4A 00 3C 00 00 00 00 00 00 00 00 00 00 00 22 C1	
        设置-70档	55 43 49 12 00 10 04 4A 00 46 00 00 00 00 00 00 00 00 00 00 00 D0 58	
        设置-80档	55 43 49 12 00 10 04 4A 00 50 00 00 00 00 00 00 00 00 00 00 00 BE 64	
        设置-90档	55 43 49 12 00 10 04 4A 00 5A 00 00 00 00 00 00 00 00 00 00 00 FC 79	
        设置-100档	55 43 49 12 00 10 04 4A 00 64 00 00 00 00 00 00 00 00 00 00 00 9A 30	
        获取	    55 43 49 12 00 10 04 8A 00 01 00 00 00 00 00 00 00 01 00 00 00 AE 87	
    空域降噪
        设置-0档	55 43 49 12 00 10 04 4B 00 00 00 00 00 00 00 00 00 00 00 00 00 CF F5	
        设置-10档	55 43 49 12 00 10 04 4B 00 0A 00 00 00 00 00 00 00 00 00 00 00 8D E8	
        设置-20档	55 43 49 12 00 10 04 4B 00 14 00 00 00 00 00 00 00 00 00 00 00 4B CF	
        设置-30档	55 43 49 12 00 10 04 4B 00 1E 00 00 00 00 00 00 00 00 00 00 00 09 D2	
        设置-40档	55 43 49 12 00 10 04 4B 00 28 00 00 00 00 00 00 00 00 00 00 00 C7 80	
        设置-50档	55 43 49 12 00 10 04 4B 00 32 00 00 00 00 00 00 00 00 00 00 00 D5 AA	
        设置-60档	55 43 49 12 00 10 04 4B 00 3C 00 00 00 00 00 00 00 00 00 00 00 43 BA	
        设置-70档	55 43 49 12 00 10 04 4B 00 46 00 00 00 00 00 00 00 00 00 00 00 B1 23	
        设置-80档	55 43 49 12 00 10 04 4B 00 50 00 00 00 00 00 00 00 00 00 00 00 DF 1F	
        设置-90档	55 43 49 12 00 10 04 4B 00 5A 00 00 00 00 00 00 00 00 00 00 00 9D 02	
        设置-100档	55 43 49 12 00 10 04 4B 00 64 00 00 00 00 00 00 00 00 00 00 00 FB 4B	
        获取	    55 43 49 12 00 10 04 8B 00 01 00 00 00 00 00 00 00 01 00 00 00 CF FC	
    时域降噪
        设置-0档	55 43 49 12 00 10 04 4C 00 00 00 00 00 00 00 00 00 00 00 00 00 C9 85	
        设置-10档	55 43 49 12 00 10 04 4C 00 0A 00 00 00 00 00 00 00 00 00 00 00 8B 98	
        设置-20档	55 43 49 12 00 10 04 4C 00 14 00 00 00 00 00 00 00 00 00 00 00 4D BF	
        设置-30档	55 43 49 12 00 10 04 4C 00 1E 00 00 00 00 00 00 00 00 00 00 00 0F A2	
        设置-40档	55 43 49 12 00 10 04 4C 00 28 00 00 00 00 00 00 00 00 00 00 00 C1 F0	
        设置-50档	55 43 49 12 00 10 04 4C 00 32 00 00 00 00 00 00 00 00 00 00 00 D3 DA	
        设置-60档	55 43 49 12 00 10 04 4C 00 3C 00 00 00 00 00 00 00 00 00 00 00 45 CA	
        设置-70档	55 43 49 12 00 10 04 4C 00 46 00 00 00 00 00 00 00 00 00 00 00 B7 53	
        设置-80档	55 43 49 12 00 10 04 4C 00 50 00 00 00 00 00 00 00 00 00 00 00 D9 6F	
        设置-90档	55 43 49 12 00 10 04 4C 00 5A 00 00 00 00 00 00 00 00 00 00 00 9B 72	
        设置-100档	55 43 49 12 00 10 04 4C 00 64 00 00 00 00 00 00 00 00 00 00 00 FD 3B	
        获取	    55 43 49 12 00 10 04 8C 00 01 00 00 00 00 00 00 00 01 00 00 00 C9 8C	
    gamma强度
        设置-0档	55 43 49 12 00 10 04 4D 00 00 00 00 00 00 00 00 00 00 00 00 00 A8 FE	
        设置-10档	55 43 49 12 00 10 04 4D 00 0A 00 00 00 00 00 00 00 00 00 00 00 EA E3	
        设置-20档	55 43 49 12 00 10 04 4D 00 14 00 00 00 00 00 00 00 00 00 00 00 2C C4	
        设置-30档	55 43 49 12 00 10 04 4D 00 1E 00 00 00 00 00 00 00 00 00 00 00 6E D9	
        设置-40档	55 43 49 12 00 10 04 4D 00 28 00 00 00 00 00 00 00 00 00 00 00 A0 8B	
        设置-50档	55 43 49 12 00 10 04 4D 00 32 00 00 00 00 00 00 00 00 00 00 00 B2 A1	
        设置-60档	55 43 49 12 00 10 04 4D 00 3C 00 00 00 00 00 00 00 00 00 00 00 24 B1	
        设置-70档	55 43 49 12 00 10 04 4D 00 46 00 00 00 00 00 00 00 00 00 00 00 D6 28	
        设置-80档	55 43 49 12 00 10 04 4D 00 50 00 00 00 00 00 00 00 00 00 00 00 B8 14	
        设置-90档	55 43 49 12 00 10 04 4D 00 5A 00 00 00 00 00 00 00 00 00 00 00 FA 09	
        设置-100档	55 43 49 12 00 10 04 4D 00 64 00 00 00 00 00 00 00 00 00 00 00 9C 40	
        获取	    55 43 49 12 00 10 04 8D 00 01 00 00 00 00 00 00 00 01 00 00 00 A8 F7	
*/
int HAL_FPGA_colormode(int value);
int HAL_FPGA_detail_enhance(int value);
int HAL_FPGA_brightness(int value);
int HAL_FPGA_contrast(int value);
int HAL_FPGA_time_domain_denoise(int value);
int HAL_FPGA_Space_domain_denoise(int value);
int HAL_FPGA_gamma(int value);

#endif